package com.leyou.user.dto;

import com.leyou.common.utils.constants.RegexPatterns;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

@Data
public class UserDTO {
    private Long id;
    @Pattern(regexp = RegexPatterns.USERNAME_REGEX,message = "用户名格式错误")
    private String username;
    @Length(min = 3,max = 30,message = "密码长度不符合要求")
    private String password;
    @Pattern(regexp = RegexPatterns.PHONE_REGEX,message = "手机号格式错误")
    private String phone;
}
